---
title: Deploying Cloud Foundry
owner: Release Integration
---

<strong><%= modified_date %></strong>

This topic describes the process for deploying Cloud Foundry using BOSH. 

Before starting this process, you must complete the following tasks:

1. Log into and target your BOSH Director
1. Create a Cloud Foundry manifest
1. Set Cloud Foundry manifest as your deployment

##<a id="stemcell"></a>Upload a Stemcell ##

A stemcell is a versioned image of a bare-minimum OS skeleton, wrapped with 
IaaS-specific packaging. 
Deploying Cloud Foundry starts with specifying a stemcell, which BOSH installs 
on each component virtual machine (VM).

1. Open [https://bosh.io/stemcells](https://bosh.io/stemcells) in a web browser
to view the current list of publicly available BOSH stemcells.

1. Select an Ubuntu Trusty stemcell for your IaaS and **click** the build number to 
download it to your computer. The stemcell downloads as a gzipped tar archive. Do not unzip this file.

1. In a terminal window, run `bosh upload stemcell STEMCELL-PATH` to upload your
stemcell to the BOSH Director, where `STEMCELL-PATH` is the location of your 
downloaded stemcell file.
<pre class="terminal">
$ bosh upload stemcell ~/downloads/light-bosh-stemcell-3202-aws-xen-hvm-ubuntu-trusty-go_agent.tgz
</pre>

##<a id="create-release"></a>Build the Cloud Foundry Release##

Use `bosh create release` to create a Cloud Foundry release.

<pre class="terminal">
$ bosh create release
</pre>

After some processing, this command prompts you for a development release name.
The release names correspond to the files in `cf-release/releases`.

##<a id="upload-release"></a>Upload the Cloud Foundry Release##

Use `bosh upload release` to upload the generated release to the BOSH
Director.

<pre class="terminal">
$ bosh upload release
</pre>

##<a id="deploy"></a>Deploy##

Use `bosh deploy` to deploy the uploaded Cloud Foundry release.

<pre class="terminal">
$ bosh deploy
</pre>

## <a id="verify"></a>Verify the Deployment ##

1. Run `bosh vms`. This command provides an overview of the virtual machines
that BOSH manages as part of the current deployment. The state of every VM
should show as **running**.

1. Use `curl` to test the API endpoint of your Cloud Foundry installation at `api.YOUR-SYSTEM-DOMAIN/info`.

    <pre class="terminal">
    $ curl api.INCORRECT-SYSTEM-DOMAIN/info
    404 Not Found: Requested route ('api.INCORRECT-SYSTEM-DOMAIN.com') does not exist.

    $ curl api.YOUR-SYSTEM-DOMAIN
    {
     "code": 10000,
     "description": "Unknown request",
     "error_code": "CF-NotFound"
    }

    $ curl api.YOUR-SYSTEM-DOMAIN/v2/info
    {"name":"vcap","build":"2222","version":2,"description":"Cloud Foundry","authorization_endpoint":"https://login.YOUR-SYSTEM-DOMAIN","token_endpoint":"https://uaa.YOUR-SYSTEM-DOMAIN","allow_debug":true}
    </pre>

    If `curl` succeeds, it should return specific JSON-formatted information about your deployment. If `curl` does not succeed, check your networking and make sure your domain
    has an NS record for your subdomain.
    <br><br>
    If you do not know `YOUR-SYSTEM-DOMAIN` for your Cloud Foundry installation, examine the `system_domain` property in your deployment manifest.

1. You should be able to target your Cloud Foundry installation with the [Cloud Foundry Command Line Interface (cf CLI)](../../cf-cli/index.html) and log in as an administrator. The username is `admin` and the password is specified in the deployment manifest:

    ```
    properties:
      ...
      uaa:
        ...
        scim:
          ...
          users:
          - admin|ADMIN_PASSWORD|...
    ```

For more information about managing organizations, spaces, users, and applications, refer to the [cf CLI](../../cf-cli/index.html) topic.

##<a id="update-cf"></a>Update Cloud Foundry##

* If you make change to your manifest, run `bosh deploy` to update your Cloud
Foundry deployment with these changes.

* If you make changes to the `cf-release` directory, run the following commands to update your Cloud Foundry deployment with these changes:
<pre class="terminal">
  $ bosh create release && bosh upload release && bosh deploy
</pre>
